import { UserHobby } from '@/enum';
import { IsEnum, IsOptional } from 'class-validator';

export default class ScenicListDto {
  pageNum: number;
  pageSize: number;
  spot: string;
  region: string;

  @IsOptional()
  @IsEnum(UserHobby, {
    message: '类型必须是  0:休闲 1:人文 2:现代 3:自然',
  })
  type: number;

  @IsOptional()
  @IsEnum(['asc', 'desc'], {
    message: '排序必须是 asc 或 desc',
  })
  sort: string;
}
